b = {
    'zero': 0,
    'one': 1,
    'two': 2,
    'three': 3,
    'four': 4,
    'five': 5,
    'six': 6,
    'seven': 7,
    'eight': 8,
    'nine': 9
}

n = input().split()
e = int(str(b[n[0]]) + str(b[n[1]]) + str(b[n[2]]))
if n[0] in b and n[0] != 'zero' and n[1] in b and n[2] in b and len(n) == 3:
    print(e)
else:
    print('Wrong input')